package com.ophiux.member.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ophiux.member.model.dto.MemberCardCollectDTO;
import com.ophiux.member.model.entity.MemberCardCollect;
import com.ophiux.member.model.vo.MemberCardCollectQueryVo;

public interface MemberCardCollectMapper extends BaseMapper<MemberCardCollect> {
	/**
	 * 查询收藏的名片
	 * @param iPage
	 * @param queryDTO
	 * @return
	 */
	IPage<MemberCardCollectDTO> extXmlGetPage(IPage<MemberCardCollect> iPage,@Param("dto") MemberCardCollectQueryVo queryDTO);
	
	/**
	 * 根据会员id,查询收藏我的数量
	 * @param id
	 * @return
	 */
	@Select("select count(id) from member_card_collect where collect_member_id=#{id}")
	Integer getCollectMyCount(Integer id);
	
	 /**
     * 根据会员id,查询我收藏的数量
     * @param id
     * @return
     */
	@Select("select count(id) from member_card_collect where member_id=#{id}")
    Integer getMyCollectCount(Integer id);
}
